import {
  defineStore
} from 'pinia';

let _this

let state_default = {
	a: '1111',
	aaaaa: 11111
}
const storeAaa = defineStore('aaa', {
  state: () => ( Object.assign(state_default, JSON.parse(localStorage.getItem('aaa'))) ),
  getters: {},
  actions: {
		async getUserinfo(time = 1000){
			_this = this
			return new Promise((resolve, reject)=>{
				setTimeout(function() {
					console.log( time );
					resolve(_this.a + '--' + time)
				}, time);
			})
		}
	},
});

export default storeAaa